; Music of Lost Caves and the Doom Tomb (1989) (Players)
; Ripped by Megachur the 01/05/2009

	write "LOSCATDT.BIN"

music_date_rip	equ &0159
music_adr	equ &0040
first_theme	equ 1
last_theme	equ 4	; 1 -> 4

	read "music_header_v1_0.asm"

	jp l0054
	jp l02ff
.l0046
	jp l026e
	jp l00a5
.l0050 equ $ + 4
.l004f equ $ + 3
.l004e equ $ + 2
.l004d equ $ + 1
.l004c
	db #04,#08,#00,#00,#40
	ret
	ret
	ret
;
.play_music
.l0054
;
	push af
	push bc
	push de
	push hl
	push ix
	call l0099
	call l030c
	call l02c2
	ld hl,l0050
	ld a,(l01e2)
	sub (hl)
	ld (l01e2),a
	sbc a
	ld (l01e1),a
	call l01e3
	ld ix,l00e4
	call l011a
	ld ix,l00f6
	call l011a
	ld ix,l0108
	call l011a
	sub a
	ld (l01e1),a
	ld c,#00
	call l04a4
	pop ix
	pop hl
	pop de
	pop bc
	pop af
	ret
.l0099
	ld a,#c9
	ld (l0099),a
	ld c,#07
	ld a,#2a
	jp l047e
.l00a5
	push af
	push bc
	push de
	push hl
	sub a
	ld (l004e),a
	ld (l00f2),a
	ld (l0104),a
	ld (l0116),a
	ld (l00f5),a
	ld (l0107),a
	ld (l0119),a
	ld hl,l0d16
	ld (l0264),hl
	ld hl,l00e2
	ld (l00ea),hl
	ld (l00fc),hl
	ld (l010e),hl
	ld (l00e4),hl
	ld (l00f6),hl
	ld (l0108),hl
	call l0371
	pop hl
	pop de
	pop bc
	pop af
	ret
.l00e4 equ $ + 2
.l00e2
	db #ff,#ff,#e2,#00,#00,#00,#04,#0a
.l00f1 equ $ + 7
.l00ee equ $ + 4
.l00ed equ $ + 3
.l00ec equ $ + 2
.l00ea
	db #e2,#00,#00,#02,#e0,#00,#01,#01
.l00f6 equ $ + 4
.l00f5 equ $ + 3
.l00f2
	db #00,#00,#00,#00,#e2,#00,#00,#00
.l0100 equ $ + 6
.l00ff equ $ + 5
.l00fe equ $ + 4
.l00fc equ $ + 2
	db #00,#08,#e2,#00,#01,#02,#e0,#00
.l0108 equ $ + 6
.l0107 equ $ + 5
.l0104 equ $ + 2
.l0103 equ $ + 1
	db #01,#01,#00,#00,#00,#00,#e2,#00
.l0111 equ $ + 7
.l0110 equ $ + 6
.l010e equ $ + 4
	db #00,#00,#02,#09,#e2,#00,#00,#02
.l0119 equ $ + 7
.l0117 equ $ + 5
.l0116 equ $ + 4
.l0115 equ $ + 3
	db #e0,#00,#01,#01,#00,#04,#00,#00
.l011a
	call l0175
	dec (ix+#0d)
	ret nz
	ld a,(ix+#0c)
	ld (ix+#0d),a
	ld l,(ix+#00)
	ld h,(ix+#01)
	ld a,(hl)
	inc hl
	inc a
	jr z,l0168
	dec a
	ld c,(ix+#05)
	call l046e
	ld a,(hl)
	inc hl
	ld (ix+#00),l
	ld (ix+#01),h
	ld b,a
	ld a,(ix+#0f)
	and #03
	jr z,l0155
	ld a,#1f
	sub b
	ld c,#06
	bit 2,(ix+#0f)
	call nz,l047e
.l0155
	ld a,(ix+#02)
	add (ix+#03)
	ld (ix+#02),a
	add b
	call l03bc
	ld c,(ix+#04)
	jp l0461
.l0168
	bit 1,(ix+#0f)
	ret z
	res 1,(ix+#0f)
	ld (ix+#0e),a
	ret
.l0175
	ld a,(l01e1)
	or a
	ret z
	dec (ix+#08)
	ret nz
	ld a,(ix+#09)
	ld (ix+#08),a
	ld l,(ix+#06)
	ld h,(ix+#07)
	ld a,(hl)
	inc a
	ret z
	dec a
	inc hl
	ld (ix+#06),l
	ld (ix+#07),h
	or a
	ret z
	bit 1,(ix+#0f)
	ret nz
	bit 0,(ix+#0f)
	jr nz,l01c5
	rlca
	rlca
	ld hl,l03eb
	add (hl)
	ld (ix+#02),a
	ld l,(ix+#0a)
	ld h,(ix+#0b)
.l01b1
	call l045c
	ld (ix+#0d),#01
	ld (ix+#0c),e
	ld (ix+#03),d
	ld (ix+#00),l
	ld (ix+#01),h
	ret
.l01c5
	dec a
	rlca
	rlca
	ld c,a
	ld b,#00
	ld hl,l0687
	add hl,bc
	call l045c
	ld a,(hl)
	ld c,#07
	call l047e
	inc hl
	ld a,(hl)
	inc hl
	ld (ix+#02),a
	ex de,hl
	jr l01b1
.l01e2 equ $ + 1
.l01e1
	db #00,#00
.l01e3
	ld a,(l00ec)
	dec a
	ret nz
	ld hl,(l00ea)
	ld a,(hl)
	inc a
	ret nz
	ld hl,(l0264)
.l01f1
	inc hl
	ld a,(hl)
	dec hl
	cp #00
	jr nz,l0216
	ld a,(hl)
	inc hl
	inc hl
	cp #01
	jr z,l0245
	cp #02
	jr z,l0238
	cp #03
	jr z,l0255
	cp #04
	jr z,l025e
	ld hl,l0d16
	ld (l0264),hl
	sub a
	ld (l004e),a
	ret
.l0216
	call l0268
	ld (l00ed),a
	ld (l00ea),de
	call l0268
	ld (l00ff),a
	ld (l00fc),de
	call l0268
	ld (l0111),a
	ld (l010e),de
	ld (l0264),hl
	ret
.l0238
	call l045c
	ex de,hl
	ld (l0266),de
	ld (l0264),hl
	jr l01f1
.l0245
	call l045c
	ld (l00ee),de
	call l045c
	ld (l0100),de
	jr l01f1
.l0255
	ld a,(hl)
	ld (l03eb),a
	inc hl
	inc hl
	jp l01f1
.l025e
	ld hl,(l0266)
	jp l01f1
.l0264
	ld d,#0d
.l0266
	ld d,#0d
.l0268
	call l045c
	ld a,(de)
	inc de
	ret
.l026e
	push af
	push bc
	push de
	push hl
	push ix
	push af
	call l0289
	pop af
	cp #08
	jr nz,l0282
	ld a,#09
	call l0046
.l0282
	pop ix
	pop hl
	pop de
	pop bc
	pop af
	ret
.l0289
	dec a
	cp #09
	ret nc
	ld c,a
	rlca
	rlca
	add c
	add c
	ld c,a
	ld b,#00
	ld hl,l04d7
	add hl,bc
	ld a,(hl)
	inc hl
	ld ix,l00e4
	cp #01
	jr z,l02af
	ld ix,l00f6
	cp #02
	jr z,l02af
	ld ix,l0108
.l02af
	ld a,(hl)
	cp (ix+#0e)
	ret c
	ld (ix+#11),#00
	ld (ix+#0e),a
	ld (ix+#10),l
	ld (ix+#11),h
	ret
.l02c2
	ld ix,l00e4
	call l02d4
	ld ix,l00f6
	call l02d4
	ld ix,l0108
.l02d4
	ld h,(ix+#11)
	ld a,h
	or a
	ret z
	ld (ix+#11),#00
	ld l,(ix+#10)
	dec hl
	dec hl
	ld a,(hl)
	ld (ix+#02),a
	dec hl
	ld a,(hl)
	dec hl
	dec hl
	ld c,#07
	bit 2,(ix+#0f)
	call nz,l047e
	set 1,(ix+#0f)
	call l045c
	ex de,hl
	jp l01b1
;
.init_music
.l02ff
;
	cp #05
	ret nc
	push af
	ld (l004e),a
	ld (l030b),a
	pop af
	ret
.l030b
	db #00
.l030c
	ld a,(l030b)
	or a
	ret z
	ld c,a
	rlca
	rlca
	ld c,a
	ld b,#00
	ld hl,l0d02
	add hl,bc
	call l045c
	ld (l0264),de
	ld a,(l0117)
	and #fc
	or (hl)
	ld (l0117),a
	ld hl,l00e2
	ld (l00ea),hl
	ld (l00e4),hl
	ld (l00f6),hl
	ld (l0108),hl
	ld a,#01
	ld (l00ec),a
	ld (l00fe),a
	ld (l0110),a
	ld (l00f1),a
	ld (l0103),a
	ld (l0115),a
	ld a,#38
	ld c,#07
	call l047e
	sub a
	ld (l01e1),a
	ld (l01e2),a
	ld (l030b),a
	ld (l00f2),a
	ld (l0104),a
	ld (l0116),a
	ld (l00f5),a
	ld (l0107),a
	ld (l0119),a
.l0371
	ld c,#08
	sub a
	ld h,a
	ld l,a
	call l047e
	inc c
	jp l0461
.l037d
	push hl
	ld h,a
	bit 1,(ix+#0f)
	jr z,l038a
	ld a,(l004d)
	jr l038d
.l038a
	ld a,(l004c)
.l038d
	cp #08
	jr z,l03b9
	and #07
	ld l,a
	sub a
	rr l
	jp nc,l039b
	ld a,h
.l039b
	sla h
	rr l
	jp nc,l03a3
	add h
.l03a3
	sla h
	rr l
	jp nc,l03ab
	add h
.l03ab
	sra a
	adc #00
	sra a
	adc #00
	sra a
	adc #00
	pop hl
	ret
.l03b9
	ld a,h
	pop hl
	ret
.l03bc
	push af
	push bc
	push de
	add #04
	ld b,#02
	ld hl,l004f
	bit 0,(hl)
	jr z,l03cc
	add #0f
.l03cc
	cp #30
	jr c,l03d5
	sub #30
	inc b
	jr l03cc
.l03d5
	ld l,a
	ld h,#00
	add hl,hl
	ld de,l03ec
	add hl,de
	call l045c
.l03e0
	srl d
	rr e
	djnz l03e0
	ex de,hl
	pop de
	pop bc
	pop af
	ret
.l03eb
	db #70
.l03ec
	dw #0eee,#0eb7,#0e81,#0e4b
	dw #0e17,#0de3,#0db0,#0d7e
	dw #0d4d,#0d1c,#0cec,#0cbc
	dw #0c8d,#0c5f,#0c32,#0c05
	dw #0bd9,#0bae,#0b83,#0b58
	dw #0b2f,#0b06,#0add,#0ab5
	dw #0a8e,#0a67,#0a41,#0a1b
	dw #09f6,#09d2,#09ae,#098a
	dw #0967,#0945,#0923,#0901
	dw #08e0,#08bf,#089f,#0880
	dw #0861,#0842,#0823,#0806
	dw #07e8,#07cb,#07ae,#0792
	ld hl,(#2b45)
	ld (#3b33),hl
	ld a,(#223b)
	ld d,d
	jr nc,l04a2
	ld c,e
	ld c,(hl)
	ld b,a
	ld e,e
.l045c
	ld e,(hl)
	inc hl
	ld d,(hl)
	inc hl
	ret
.l0461
	push af
	ld a,l
	call l047e
	inc c
	ld a,h
	call l047e
	dec c
	pop af
	ret
.l046e
	call l037d
	or a
	jr z,l047e
	push bc
	srl a
	ld b,a
	srl b
	add b
	add #04
	pop bc
.l047e
	push af
	push bc
	push af
	ld b,#f4
	out (c),c
	ld bc,#f6c0
	in a,(c)
	or c
	out (c),a
	xor c
	out (c),a
	pop af
	ld b,#f4
	out (c),a
	ld b,#f6
	in a,(c)
	or #80
	out (c),a
	xor #80
	out (c),a
	pop bc
.l04a2
	pop af
	ret
.l04a4
	push bc
	push af
	push bc
	ld bc,#f40e
	out (c),c
	ld bc,#f6c0
	in a,(c)
	or c
	out (c),a
	xor c
	out (c),a
	pop bc
	pop af
	ld b,#f7
	ld a,#92
	out (c),a
	push bc
	set 6,c
	ld b,#f6
	out (c),c
	ld b,#f4
	in a,(c)
	pop bc
	push af
	ld a,#82
	out (c),a
	pop af
	pop bc
	ret
	add hl,bc
	dec b
	jr z,l04eb
.l04d7
	db #00,#04,#f9,#05,#38,#78,#02,#03
	db #44,#05,#28,#64,#00,#03,#55,#05
.l04eb equ $ + 4
	db #38,#50,#01,#03,#3a,#06,#38,#78
	db #01,#03,#93,#05,#28,#1e,#00,#01
	db #7e,#05,#28,#3c,#00,#02,#bc,#05
	db #38,#8d,#01,#04,#bc,#05,#38,#a5
	db #02,#04,#02,#ff,#0f,#0c,#0f,#00
	db #0d,#14,#0e,#00,#0c,#13,#0d,#02
	db #0a,#0e,#09,#08,#08,#0c,#09,#07
	db #07,#0a,#06,#09,#07,#0a,#05,#04
	db #05,#08,#04,#07,#03,#09,#04,#06
	db #05,#08,#05,#07,#04,#06,#03,#07
	db #02,#09,#03,#06,#02,#08,#01,#07
	db #01,#06,#00,#01,#ff,#01,#0c,#0f
	db #1f,#0a,#0a,#08,#00,#06,#00,#04
	db #00,#02,#00,#00,#01,#ff,#01,#04
	db #0f,#20,#0e,#2c,#0d,#34,#0c,#20
	db #0b,#2c,#0a,#34,#09,#20,#08,#2c
	db #07,#34,#06,#20,#05,#2c,#04,#34
	db #03,#20,#02,#2c,#02,#34,#01,#20
	db #01,#2c,#01,#34,#00,#01,#ff,#01
	db #fa,#0f,#00,#08,#04,#04,#00,#03
	db #04,#03,#04,#02,#04,#01,#03,#01
	db #00,#00,#01,#ff,#01,#fe,#0f,#08
	db #08,#0c,#00,#00,#0a,#0e,#04,#0d
	db #00,#00,#08,#0c,#03,#0b,#0a,#0a
	db #06,#09,#00,#00,#04,#08,#01,#07
	db #0a,#08,#04,#00,#00,#00,#08,#08
	db #03,#03,#00,#01,#ff,#01,#ff,#0c
	db #00,#0f,#1e,#0c,#28,#0f,#0c,#0c
	db #00,#0f,#1e,#0c,#28,#0f,#0c,#0c
	db #02,#0f,#20,#0c,#2a,#0f,#0e,#0c
	db #02,#0f,#20,#0c,#2a,#0f,#0e,#0c
	db #00,#0f,#1e,#0c,#28,#0f,#0c,#0c
	db #ff,#0b,#1d,#0a,#26,#09,#0a,#08
	db #fd,#06,#1b,#04,#24,#02,#08,#00
	db #01,#ff,#01,#02,#0e,#02,#0a,#1c
	db #06,#2e,#0e,#02,#0a,#1c,#06,#2e
	db #0e,#02,#0a,#1c,#06,#2e,#0e,#02
	db #0a,#1c,#06,#2e,#0e,#02,#0a,#1c
	db #06,#2e,#0e,#02,#0a,#1c,#06,#2e
	db #0c,#fc,#08,#16,#04,#28,#0a,#f6
	db #06,#10,#03,#22,#08,#f0,#04,#0a
	db #02,#1c,#06,#ea,#03,#04,#01,#16
	db #00,#01,#ff,#01,#00,#0f,#20,#0e
	db #30,#0d,#3c,#0c,#24,#0b,#34,#0a
	db #40,#09,#2c,#08,#3c,#07,#48,#0a
	db #20,#09,#30,#07,#3c,#08,#24,#06
	db #34,#04,#40,#06,#2c,#04,#3c,#02
	db #48,#08,#20,#06,#30,#04,#3c,#05
	db #24,#03,#34,#02,#40,#03,#28,#02
	db #38,#01,#44,#05,#20,#03,#30,#02
	db #3c,#04,#24,#03,#34,#01,#40,#02
	db #28,#01,#38,#00,#44,#00,#01,#ff
.l0687
	db #9b,#06,#2a,#28,#ae,#06,#2a,#64
	db #c7,#06,#2a,#00,#d8,#06,#2a,#00
	db #01,#07,#38,#90,#01,#00,#0a,#05
	db #08,#04,#06,#03,#05,#03,#04,#02
	db #03,#02,#02,#01,#00,#01,#ff,#02
	db #00,#02,#14,#04,#15,#06,#16,#08
	db #17,#09,#18,#09,#19,#09,#1a,#09
	db #1b,#09,#1c,#09,#1d,#00,#00,#ff
	db #01,#00,#0a,#1e,#08,#19,#07,#18
	db #06,#17,#04,#16,#03,#16,#00,#01
	db #ff,#02,#00,#09,#1f,#09,#1e,#08
	db #1d,#08,#1c,#07,#1b,#07,#1a,#06
	db #19,#06,#18,#05,#17,#04,#16,#03
	db #15,#03,#15,#02,#14,#02,#14,#02
	db #14,#02,#14,#01,#14,#01,#14,#00
	db #01,#ff,#01,#fc,#04,#00,#08,#14
	db #0a,#00,#08,#14,#07,#00,#07,#14
	db #07,#00,#07,#14,#06,#00,#06,#14
	db #06,#00,#06,#14,#06,#00,#06,#14
	db #05,#00,#05,#14,#05,#00,#05,#14
	db #05,#00,#05,#14,#04,#00,#04,#14
	db #04,#00,#04,#14,#04,#00,#04,#14
	db #03,#00,#03,#14,#03,#00,#03,#14
	db #02,#00,#02,#14,#02,#00,#02,#14
	db #01,#00,#01,#14,#01,#00,#01,#14
	db #00,#01,#ff,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#04,#04,#04,#04,#04
	db #04,#04,#04,#01,#00,#0f,#a0,#0c
	db #a0,#08,#a0,#06,#a0,#05,#a0,#04
	db #a0,#04,#a0,#03,#a0,#02,#a0,#02
	db #a0,#00,#01,#ff,#01,#00,#0f,#d0
	db #0c,#00,#08,#d0,#06,#00,#05,#d0
	db #04,#00,#04,#d0,#03,#00,#02,#d0
	db #02,#00,#00,#01,#ff,#02,#00,#06
	db #00,#0a,#02,#0c,#00,#0d,#fe,#0c
	db #00,#08,#02,#03,#00,#07,#fe,#0a
	db #00,#0b,#02,#09,#00,#06,#fd,#02
	db #00,#06,#02,#08,#00,#04,#fd,#02
	db #00,#03,#02,#02,#00,#01,#00,#00
	db #01,#ff,#01,#00,#06,#00,#0a,#00
	db #0c,#00,#0d,#00,#0c,#ff,#08,#ff
	db #09,#fe,#06,#fd,#02,#fc,#06,#fb
	db #08,#fa,#04,#f8,#02,#f6,#03,#f4
	db #02,#f4,#01,#f0,#00,#01,#ff,#01
	db #00,#0c,#fa,#0c,#fd,#0b,#00,#0b
	db #03,#0a,#06,#0a,#03,#09,#00,#09
	db #fd,#08,#fa,#08,#fd,#07,#00,#07
	db #03,#06,#06,#06,#03,#05,#00,#05
	db #fd,#04,#fa,#04,#fd,#04,#00,#04
	db #03,#03,#06,#03,#03,#03,#00,#03
	db #fd,#02,#fa,#02,#fd,#02,#00,#02
.l0d02 equ $ + 4			; ptr theme adr !
	db #03,#01,#06,#01,#03,#00,#01,#ff
	dw ld600	;#d600
	db #01,#00,#78,#0e,#01,#00
	db #b4,#0e,#01,#00,#00,#0f,#01,#00
.l0d16
	db #00,#00,#10,#00,#ff,#02,#08,#00
	db #08,#0f,#11,#00,#0f,#11,#ff,#02
	db #08,#00,#08,#00,#11,#00,#0f,#00
	db #ff,#02,#14,#00,#11,#0f,#08,#00
	db #0f,#0f,#ff,#02,#11,#11,#11,#00
	db #0f,#00,#11,#00,#ff,#02,#11,#11
	db #11,#00,#0f,#11,#0f,#00,#ff,#02
	db #11,#0f,#0c,#0f,#08,#00,#00,#00
	db #ff,#02,#0f,#0f,#08,#0f,#11,#00
	db #14,#14,#ff,#02,#08,#0f,#00,#14
	db #11,#00,#0f,#00,#ff,#02,#14,#14
	db #11,#11,#0f,#00,#08,#00,#ff,#02
	db #11,#00,#11,#00,#0f,#0f,#11,#00
	db #ff,#02,#11,#0f,#11,#14,#0f,#0f
	db #0c,#0f,#ff,#02,#11,#0f,#0c,#00
	db #08,#00,#00,#00,#ff,#02,#0f,#0f
	db #0c,#0d,#0f,#0f,#14,#11,#ff,#02
	db #0f,#0f,#0c,#0d,#0f,#0d,#0c,#00
	db #ff,#02,#0f,#0c,#0d,#0f,#0c,#0d
	db #0f,#0c,#ff,#02,#0f,#0f,#0d,#0f
	db #0c,#00,#00,#00,#ff,#02,#0f,#0f
	db #0c,#00,#0f,#0f,#14,#00,#ff,#02
	db #0f,#0c,#0d,#0f,#08,#00,#00,#00
	db #ff,#02,#0c,#0c,#0f,#00,#0c,#00
	db #0f,#0f,#ff,#02,#0c,#0f,#08,#00
	db #0c,#00,#0f,#00,#ff,#02,#0c,#0f
	db #08,#00,#08,#08,#08,#08,#ff,#02
	db #0f,#0c,#0d,#0f,#0f,#0c,#0d,#0c
	db #ff,#02,#0f,#0c,#0d,#0f,#0c,#0a
	db #08,#00,#ff,#02,#02,#00,#01,#01
	db #03,#00,#00,#00,#ff,#02,#01,#00
	db #04,#01,#04,#01,#04,#01,#ff,#02
	db #02,#00,#01,#00,#01,#00,#00,#00
	db #ff,#02,#02,#00,#02,#00,#05,#00
	db #00,#00,#ff,#02,#01,#00,#01,#01
	db #02,#01,#00,#00,#ff,#02,#03,#00
	db #01,#03,#01,#00,#01,#03,#ff,#02
	db #01,#00,#01,#03,#01,#01,#03,#03
	db #ff,#02,#01,#00,#01,#01,#05,#00
	db #00,#00,#ff,#01,#03,#00,#03,#00
	db #01,#00,#01,#01,#03,#00,#03,#00
	db #01,#01,#01,#01,#ff,#01,#03,#00
	db #03,#00,#01,#00,#01,#00,#04,#00
	db #00,#00,#02,#00,#00,#00,#ff,#06
	db #00,#ff,#03,#00,#78,#00,#01,#00
	db #a0,#0c,#41,#0c,#96,#0e,#d9,#0d
	db #01,#0e,#a0,#0e,#aa,#0e,#47,#0e
	db #75,#0e,#75,#0e,#75,#0e,#00,#00
	db #02,#08,#07,#08,#0f,#11,#0f,#11
	db #0f,#ff,#02,#0c,#0d,#0f,#0c,#08
	db #00,#00,#00,#ff,#02,#0c,#0f,#08
	db #00,#08,#00,#00,#00,#ff,#03,#00
	db #78,#00,#01,#00,#c5,#0c,#73,#0c
	db #d8,#0e,#ec,#0e,#3d,#0e,#e2,#0e
	db #f6,#0e,#3d,#0e,#75,#0e,#75,#0e
	db #75,#0e,#75,#0e,#75,#0e,#75,#0e
	db #00,#00,#02,#0c,#0c,#0d,#0f,#0c
	db #0c,#0d,#0f,#ff,#02,#0c,#0c,#0d
	db #0f,#14,#14,#14,#00,#ff,#02,#0c
	db #0f,#0c,#0f,#0c,#0f,#0f,#0f,#ff
	db #02,#0c,#0f,#0c,#0f,#14,#14,#14
	db #00,#ff,#03,#00,#78,#00,#01,#00
	db #73,#0c,#41,#0c,#24,#0f,#38,#0f
	db #4c,#0f,#2e,#0f,#42,#0f,#56,#0f
	db #75,#0e,#75,#0e,#75,#0e,#75,#0e
	db #75,#0e,#75,#0e,#00,#00,#02,#08
	db #05,#08,#0f,#11,#0f,#11,#0f,#ff
	db #02,#0c,#0c,#0d,#0f,#08,#08,#14
	db #14,#ff,#02,#0c,#0d,#0f,#0d,#08
	db #00,#08,#00,#ff,#02,#0c,#0d,#0f
	db #0d,#14,#14,#14,#00,#ff,#02,#02
	db #00,#01,#01,#01,#00,#01,#00,#ff
	db #02,#02,#00,#01,#01,#03,#03,#03
	db #03,#ff
	
; #d600	; main theme location
.ld600
	db #03,#00,#78,#00,#01,#00,#73,#0c
	db #41,#0c,#02,#00
	dw ld78c
.ld60e
	db #01,#00,#73,#0c,#41,#0c,#02,#00
	dw ld67e
	db #02,#00
	dw ld6e8
	db #02,#00
	dw ld7a6
	db #01,#00,#73,#0c,#c5,#0c,#02,#00
	dw ld67e
	db #02,#00
	dw ld6e8
	db #02,#00
	dw ld78c
	db #01,#00,#73,#0c,#c5,#0c,#02,#00
	dw ld67e
	db #02,#00
	dw ld73a
	db #02,#00
	dw ld7a6
	db #01,#00,#41,#0c,#73,#0c,#02,#00
	dw ld67e
	db #02,#00
	dw ld6e8
	db #02,#00
	dw ld78c
	db #01,#00,#a0,#0c,#5a,#0c,#02,#00
	dw ld67e
	db #02,#00
	dw ld73a
	db #02,#00
	dw ld78c
	db #01,#00,#c5,#0c,#a0,#0c,#02,#00
	dw ld6e8
	db #02,#00
	dw ld73a
	db #02,#00
	dw ld7c0
	db #02,#00
	dw ld60e
.ld67e
	db #1b,#0d,#cf,#0d,#01,#0e,#25,#0d
	db #d9,#0d,#01,#0e,#2f,#0d,#cf,#0d
	db #01,#0e,#39,#0d,#d9,#0d,#0b,#0e
	db #03,#00,#8c,#00,#1b,#0d,#cf,#0d
	db #15,#0e,#25,#0d,#d9,#0d,#15,#0e
	db #2f,#0d,#cf,#0d,#15,#0e,#43,#0d
	db #e3,#0d,#15,#0e,#03,#00,#78,#00
	db #1b,#0d,#cf,#0d,#01,#0e,#25,#0d
	db #d9,#0d,#0b,#0e,#2f,#0d,#cf,#0d
	db #01,#0e,#4d,#0d,#d9,#0d,#1f,#0e
	db #18,#0d,#cf,#0d,#01,#0e,#18,#0d
	db #d9,#0d,#0b,#0e,#18,#0d,#cf,#0d
	db #01,#0e,#18,#0d,#d9,#0d,#0b,#0e
.ld6e8 equ $ + 2
	db #04,#00,#57,#0d,#cf,#0d,#29,#0e
	db #61,#0d,#d9,#0d,#29,#0e,#6b,#0d
	db #cf,#0d,#33,#0e,#75,#0d,#d9,#0d
	db #33,#0e,#03,#00,#8c,#00,#57,#0d
	db #cf,#0d,#29,#0e,#61,#0d,#d9,#0d
	db #29,#0e,#6b,#0d,#cf,#0d,#29,#0e
	db #7f,#0d,#d9,#0d,#3d,#0e,#03,#00
	db #78,#00,#57,#0d,#cf,#0d,#33,#0e
	db #61,#0d,#d9,#0d,#3d,#0e,#6b,#0d
	db #cf,#0d,#29,#0e,#89,#0d,#e3,#0d
.ld73a equ $ + 4
	db #47,#0e,#04,#00,#93,#0d,#ed,#0d
	db #29,#0e,#9d,#0d,#ed,#0d,#29,#0e
	db #a7,#0d,#ed,#0d,#33,#0e,#b1,#0d
	db #ed,#0d,#33,#0e,#03,#00,#8c,#00
	db #93,#0d,#ed,#0d,#29,#0e,#9d,#0d
	db #ed,#0d,#29,#0e,#a7,#0d,#ed,#0d
	db #29,#0e,#bb,#0d,#f7,#0d,#3d,#0e
	db #03,#00,#78,#00,#93,#0d,#ed,#0d
	db #33,#0e,#9d,#0d,#ed,#0d,#3d,#0e
	db #a7,#0d,#ed,#0d,#29,#0e,#c5,#0d
.ld78c equ $ + 6
	db #ed,#0d,#47,#0e,#04,#00,#18,#0d
	db #cf,#0d,#01,#0e,#18,#0d,#d9,#0d
	db #01,#0e,#18,#0d,#cf,#0d,#01,#0e
	db #18,#0d,#e3,#0d,#0b,#0e,#04,#00
.ld7a6
	db #18,#0d,#cf,#0d,#01,#0e,#18,#0d
	db #cf,#0d,#01,#0e,#18,#0d,#cf,#0d
	db #01,#0e,#18,#0d,#cf,#0d,#0b,#0e
.ld7c0 equ $ + 2
	db #04,#00,#18,#0d,#18,#0d,#51,#0e
	db #18,#0d,#18,#0d,#63,#0e,#04,#00
	db #00

;org #10da
;ld a,#02
;call #0043

;
.game_name
	db "Lost Caves and the Doom Tomb",0
.game_year
	db "1989",0
.game_publisher
	db "Players",0
.music_author
	db "",0
.music_comment
	db "",0

	read "music_end_v1_0.asm"
